import instance from "@/http/index.js";

// 登录记录
export const loginLog = (account, name, email) => {
  return instance({
    url: "/llog/loginLog",
    method: "POST",
    data: {
      account,
      name,
      email,
    },
  });
};
// 操作记录
export const operationLog = (
  operation_person,
  operation_content,
  operation_level
) => {
  return instance({
    url: "/olog/operationLog",
    method: "POST",
    data: {
      operation_person,
      operation_content,
      operation_level,
    },
  });
};
// 返回登录日志列表;
export const loginLogList = () => {
  return instance({
    url: "/llog/loginLogList",
    method: "POST",
  });
};
// 返回操作日志列表;
export const operationLogList = () => {
  return instance({
    url: "/olog/operationLogList",
    method: "POST",
  });
};
// 搜索最近10条登录日志列表;
export const searchloginLogList = (account) => {
  return instance({
    url: "/llog/searchloginLogList",
    method: "POST",
    data: {
      account,
    },
  });
};
// 搜索最近10条操作日志列表;
export const searchOperationLogList = (operation_person) => {
  return instance({
    url: "/olog/searchOperationLogList",
    method: "POST",
    data: {
      operation_person,
    },
  });
};

// 返回登录日志列表长度;
export const loginLogListLength = () => {
  return instance({
    url: "/llog/loginLogListLength",
    method: "POST",
  });
};
// 返回操作日志列表长度;
export const operationLogListLength = () => {
  return instance({
    url: "/olog/operationLogListLength",
    method: "POST",
  });
};
// 监听换页返回数据 登录日志列表页面
export const returnLoginListData = (pager) => {
  return instance({
    url: "/llog/returnLoginListData",
    method: "POST",
    data: {
      pager,
    },
  });
};
// 监听换页返回数据 操作日志列表页面;
export const returnOperationListData = (pager) => {
  return instance({
    url: "/olog/returnOperationListData",
    method: "POST",
    data: {
      pager,
    },
  });
};
// 清空登录日志;
export const clearloginLogList = () => {
  return instance({
    url: "/llog/clearloginLogList",
    method: "POST",
  });
};
// 清空操作日志;
export const clearOperationLogList = () => {
  return instance({
    url: "/olog/clearOperationLogList",
    method: "POST",
  });
};
